<template>
	<view>
		<div id="my_note">
			<div class="nav">
				<ul class="am-avg-sm-4">
					<li class="cur" @click="waitorder">待付款</li>
					<li @click="pay">已付款</li>
					<li @click="waituse">待使用</li>
					<li @click="waitcomment">待评价</li>
				</ul>
			</div>
			<div id="app">
				<div class="cont">
					<ul v-for="b in order">
						<li>
							<div class="box_cont">
						<li title="" @click="itemClicked(b)">
							<div class="pic">

								{{b.active_name}}<br>
								<span class="date">{{b.address_name}}</span>
								<span class="date">{{b.address_address}}</span>
							</div>
							<div class="project_cont">
								<p>{{b.active_cost}}</p>
							</div>

						</li>
				</div>
				{{b.time}}

				</li>
				</ul>
				<div id="none">
					没有更多了
				</div>
			</div>
		</div>
		</div>
	</view>
</template>

<script>
	import config from '@/config'

	export default {
		data() {
			return {
				uni,
				usr: '',
				order: {},
				type: 0,
			}
		},

		methods: {
			waitorder: function() {
				uni.redirectTo({ //跳转我的页面
					url: '../user/waitorder',
				});
			},
			pay: function() {
				uni.redirectTo({ //跳转我的页面
					url: '../user/pay',
				});
			},
			waituse: function() {
				uni.redirectTo({ //跳转我的页面
					url: '../user/waituse',
				});
			},
			waitcomment: function() {
				uni.redirectTo({ //跳转我的页面
					url: '../user/waitcomment',
				});
			},
		},
		onLoad() {
			var that = this;
			uni.request({
				url: `${config.baseUrl}/comment/payorder?token=` + uni.getStorageSync('token'),
				method: 'GET',
				success(r) {
					if (r.data.succ) {
						that.order = r.data.data;
					}
				}
			});
		}
	}
</script>

<style>
	.input {
		width: 50px;
		height: 40px;

	}
</style>
